package io.adrainty.algorithm.mars;

/**
 * 找单独的数
 * @link <a href="https://www.marscode.cn/practice/364l85wv6oo6lq?problem_id=7414004855077912620">...</a>
 * @author AdRainty
 * @version V1.0.0
 * @since 2024/11/21 下午9:14
 */
public class Solution001 {

    private Solution001() {}

    public static int solution(int[] cards) {
        // Edit your code here
        int ans = 0;

        for (int card: cards) ans ^= card;

        return ans;
    }

}
